dict_a = {"name": "lilisi"}
dict_b = {"age": 18}

# 方法1: 合并为新的dict
dict_total = dict_a | dict_b
print(dict_total)
"""
{'name': 'lilisi', 'age': 18}
"""

# 方法2: 合并到原有的dict
dict_a.update(dict_b)
print(dict_a)
"""
{'name': 'lilisi', 'age': 18}
"""
